class CreateChatContents < ActiveRecord::Migration
  def self.up
    create_table :chat_contents do |t|
      t.integer :chat_from
      t.string :chat_from_name #发送者姓名，这是为了方便显示，加快显示速度．
      t.string :chat_to# |user_id|间隔
      t.string :chat_to_name # 接收者姓名，这是为了方便显示，加快显示速度．
      t.string :content
      t.timestamps
    end
    ChatContent.create(:chat_from => 1,:chat_to=>'2',:content =>'Hello')
  end
  
  def self.down
    drop_table :chat_contents
  end
end
